const types = {
  INIT_LEFT_MENU: 'INIT_LEFT_MENU', // 初始化左侧菜单
}
const menu = {
  state: {
    sidebar: {
      opened: true,
    },
    isCollapse: false
  },
  getters: {
    sidebar: state => state.sidebar,
    isCollapse: state => state.isCollapse,
  },
  mutations: {
    [types.INIT_LEFT_MENU](state) {
      state.sidebar = state.sidebar
    }
  },
  actions: {
    initLeftMenu: ({
      commit
    }) => {
      commit(types.INIT_LEFT_MENU)
    }
  }

}


export default menu;
